import string
import random

with open("big.data",'w+',encoding="utf-8")as f:
    line = random.randint(1,50)
    for i in range(line):
        f.write("".join(random.choices(string.ascii_lowercase,k = random.randint(1,5)))+"\n")

def q4():
    with open('big.data','r')as f:
        li = f.readlines()
        le = [len(j) for j in li]
        yield max(le)

main = q4()
print(next(main))
